package org.tri.gui.worker;

import java.util.Collection;
import javax.swing.SwingWorker;
import org.tri.persistence.PersistenceManager;

/**
 * La clase {@code EvictWorker}
 * @author kiira
 * @version 1.0, Mar 1, 2012
 */
public class EvictWorker extends SwingWorker {

    private Collection toEvict;
    
    public EvictWorker( Collection toEvict ) {
        this.toEvict = toEvict;
        
    }
    
    @Override
    protected Object doInBackground() throws Exception {
        PersistenceManager.evict( toEvict );
        
        toEvict.clear();
        
        return null;
        
    }

}//end clase EvictWorker
